<%-- 
    Document   : AdminDashboard
    Created on : Feb 22, 2014, 10:39:07 AM
    Author     : Mukesh
--%>

<%@page import="Country.CountryBean"%>
<%@page import="Category.CategoryBean"%>
<%@page import="Course.CourseBean"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Vector"%>
<%@page import="FeeType.FeeTypeBean"%>

<%
    try {
        if (session.getAttribute("uid") != null) {
            if (session.getAttribute("New_Admission").toString().equals("1")) {
%>
<%String to = "", status = "", msg = "", admissionId = "";%>
<%if (request.getParameter("admissionId") != null) {
        admissionId = request.getParameter("admissionId");
    }%>

    
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html>
    <head>
        <title>Ramgovind Automated System</title>

        <link rel="stylesheet" href="/RIT/css/bootstrap.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap-responsive.css">
        <link rel="stylesheet" href="/RIT/css/jquery.fancybox.css">
        <link rel="stylesheet" href="/RIT/css/style.css">
        <link rel="stylesheet" href="/RIT/css/iconfont.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap.datepicker.css">
        <script src="../../ajax/ajax.js"></script>
        <!--validation plug -->

        <script src="http://jquery.bassistance.de/validate/lib/jquery.js"></script>
        <script src="http://jquery.bassistance.de/validate/jquery.validate.js"></script>
        <!-- end validation -->

        <script>
            $.validator.setDefaults({
                submitHandler: function() {
                    alert("submitted!");
                }
            });

            $().ready(function() {
                // validate the comment form when it is submitted
                $("#f1").validate();
                $("#f2").validate();
                $("#f3").validate();
                $("#f4").validate();
                $("#f5").validate();
                $("#f6").validate();

                // validate signup form on keyup and submit

                // propose username by combining first- and lastname
                $("#username").focus(function() {
                    var firstname = $("#firstname").val();
                    var lastname = $("#lastname").val();
                    if (firstname && lastname && !this.value) {
                        this.value = firstname + "." + lastname;
                    }
                });
                //code to hide topic selection, disable for demo
                var newsletter = $("#newsletter");
                // newsletter topics are optional, hide at first
                var inital = newsletter.is(":checked");
                var topics = $("#newsletter_topics")[inital ? "removeClass" : "addClass"]("gray");
                var topicInputs = topics.find("input").attr("disabled", !inital);
                // show when newsletter is checked
                newsletter.click(function() {
                    topics[this.checked ? "removeClass" : "addClass"]("gray");
                    topicInputs.attr("disabled", !this.checked);
                });
            });
            function loadDocument()
            {
                var xmlhttp;
                if (window.XMLHttpRequest)
                {
                    xmlhttp = new XMLHttpRequest();
                }
                else
                {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.onreadystatechange = function()
                {
                    if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
                    {
                        document.getElementById('doc').innerHTML = xmlhttp.responseText;
                    }
                }
                xmlhttp.open("POST", "/RIT/AdmissionDocument", true);
                xmlhttp.send();
            }
            function enableDocument(id)
            {
                var val = id.split("-");
                if (document.getElementById(id).checked)
                {
                    document.getElementById(val[0] + '-t').disabled = false;
                    document.getElementById(val[0] + '-f').disabled = false;
                }
                else
                {
                    document.getElementById(val[0] + "-t").disabled = true;
                    document.getElementById(val[0] + "-t").value = "";
                    document.getElementById(val[0] + '-f').disabled = true;
                    document.getElementById(val[0] + '-f').value = "";
                }
            }
            function enquiryDetailsLoad()
            {
                var enqData;
                var mobileno=document.getElementById("mobile").value;
                var xmlhttp;
                if (window.XMLHttpRequest)
                {
                    xmlhttp = new XMLHttpRequest();
                }
                else
                {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.onreadystatechange = function()
                {
                    if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
                    {
                        enqData = xmlhttp.responseText;
                        if(enqData!=""){
                        var data=enqData.split("--");
                        document.getElementById("stuName").value=data[0];
                        document.getElementById("fName").value=data[3];
                        document.getElementById("email").value=data[4];
                        document.getElementById("category").innerHTML='<option value="'+data[5]+'">'+data[6]+'</option>';
                        document.getElementById("course").innerHTML='<option value="'+data[8]+'">'+data[8]+'</option>';
                        document.getElementById("stream").innerHTML='<option value="'+data[7]+'">'+data[9]+'</option>';
                        if(data[1]==1){
                            document.getElementById("ma").checked=true;
                        }else{
                            document.getElementById("fe").checked=true;
                        }
                        }
                    }
                }
                xmlhttp.open("POST", "/RIT/EnquiryDetailLoad?mobileno="+mobileno, true);
                xmlhttp.send();
            }
        </script>
        <style>
            .error {
                color: #b94a48;
            }
        </style>

    </head>
    <body onload="loadDocument()">

        <%@include file="/topheader.html" %>
        <%@include file="/servicesheader.html" %>
        <div class="main">
            <div class="container-fluid">
                <%@include file="/Services/Admission/admsidenav.html" %>
                <div class="content">
                    <%if (session.getAttribute("status") != null) {
                            status = session.getAttribute("status").toString();
                            msg = session.getAttribute("msg").toString();
                    %>
                    <div class="alert alert-info alert-block">
                        <a class="close" data-dismiss="alert" href="#"><img src="/RIT/img/mclose.png"></a>
                        <h4 class="alert-heading"> <%=status%></h4>
                        <%=msg%>
                    </div>
                    <%session.removeAttribute("status");
                            session.removeAttribute("msg");
                        }%>

                    <div class="row-fluid">
                        <div class="span12">
                            <div class="box">
                                <div class="box-head tabs-main tabs">
                                    <ul class="nav nav-tabs nav-tabs-main">
                                        <%if (request.getParameter("goto") != null) {
                                                to = request.getParameter("goto");
                                            } else {
                                                to = "";
                                            }%>
                                        <li <%if (to.equals("")) {%>class='active'<%}%> >
                                            <a href="#1" data-toggle="tab" >Admission Details<span style="color: red;"> *</span></a>
                                        </li>
                                        <li <%if (to.equals("2")) {%>class='active'<%}%> >
                                            <a href="#2" data-toggle="tab" >Student Details<span style="color: red;"> *</span></a>
                                        </li>
                                        <li <%if (to.equals("3")) {%>class='active'<%}%>>
                                            <a href="#3" data-toggle="tab">Guardian/Parents Details</a>
                                        </li>
                                        <li <%if (to.equals("4")) {%>class='active'<%}%> >
                                            <a href="#4" data-toggle="tab">Academic Details</a>
                                        </li>
                                        <li <%if (to.equals("5")) {%>class='active'<%}%> >
                                            <a href="#5" data-toggle="tab">Documents Details</a>
                                        </li>
                                        <li <%if (to.equals("6")) {%>class='active'<%}%> >
                                            <a href="#6" data-toggle="tab">Other Facilities</a>
                                        </li>
                                    </ul>
                                </div>
                                <div class="box-content">
                                    <div class="tab-content">
                                        <!-----------start From 1 for Admission Details--------------------->
                                        <div class="tab-pane <%if (to.equals("")) {%>active<%}%>" id="1">
                                            <div class="box-content">
                                                <form action="/RIT/AddAdmission" method="post" id="f1" class='form-horizontal'>
                                                    <span style="float: right; color: red;">* Step 1 and 2 are mandatory</span>
                                                    <legend>Admission Details </legend>
                                                    <!--------Left--------->
                                                    <div style="float:left;width: 45%;">
                                                        <div class="control-group">
                                                            <label for="mobile" class="control-label">Mobile<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="mobile" id="mobile" class="number  " onblur="enquiryDetailsLoad()">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="rollNo" class="control-label">Roll No.<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="rollNo" id="rollNo" class='required number'>
                                                            </div>
                                                        </div>

                                                        <div class="control-group">
                                                            <label for="appNo" class="control-label">Application No<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="appNo" id="appNo" class='input-square required'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="admiDate" class="control-label">Admission Date<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="admiDate" id="admiDate" class='input-square datepick required'>
                                                            </div>
                                                        </div>
                                                   </div>
                                                    <!--------Right--------->
                                                    <div style="float: left;">
                                                        <div class="control-group">
                                                            <label for="email" class="control-label">Student Email<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="email" id="email"  class="email required" value="">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="session" class="control-label">Session<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <select name="session" id="session" class='{required:true}'>
                                                                    <option value="">Select Session</option>
                                                                    <%
                                                                        for (int i = 2010; i < 2050; i++) {
                                                                    %>
                                                                    <option value="<%=i%>-<%=i + 1%>"><%=i%>-<%=i + 1%></option>
                                                                    <%
                                                                        }
                                                                    %>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="course" class="control-label">Course<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <select name="course" id="course"  onchange="getStream('stream', this.value)" class='{required:true}'>
                                                                    <option value="">Select Course</option>
                                                                    <%{
                                                                            Vector<Object> list = Course.Query.viewAlldistinct();
                                                                            Iterator it = list.iterator();
                                                                            while (it.hasNext()) {
                                                                                CourseBean cb = (CourseBean) it.next();
                                                                    %>
                                                                    <option value="<%=cb.getCourseName()%>"><%=cb.getCourseName()%></option>
                                                                    <%}
                                                                        }%>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="stream" class="control-label">Stream<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <select name="stream" id="stream" class='{required:true}'>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-actions" style="clear: both; border-bottom: 1px solid #e5e5e5;">
                                                        <input type="submit" class='btn btn-primary'>
                                                    </div>
                                                </form>
                                            </div>        
                                        </div>
                                        <!-----------start From 2 for Student Details--------------------->

                                        <div class="tab-pane <%if (to.equals("2")) {%>active<%}%> " id="2">
                                            <div class="box-content">
                                                <form action="/RIT/AddStuDetails" method="post" id="f2" class='form-horizontal' enctype="multipart/form-data" onsubmit=" return chkEmpty('stuName')">

                                                    <legend>Student Details</legend>
                                                    
                                                    <!--------Left--------->
                                                    <div style="float:left;width: 45%;">
                                                        <div class="control-group">
                                                            <label for="stuName" class="control-label">Student Name<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="stuName" id="stuName" class="required" >
                                                                <input type="hidden" name="admissionId" id="admissionId" value="<%=admissionId%>">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="radio2" class="control-label ">Gender<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <label class="radio" style="float: left;"><input type="radio" name="gender" id="ma" value="Male" checked >Male</label>
                                                                <label class="radio" style="float: left;padding-top: 5px; padding-left: 59px;"><input type="radio" name="gender" id="fe" value="Female">Female</label>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="stuAdd" class="control-label">Address 1<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="stuAdd1" id="stuAdd1" class="input-squareequired required" onblur="chkEmpty(this.id)">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="stuAdd" class="control-label">Address 2</label>
                                                            <div class="controls">
                                                                <input type="text" name="stuAdd2" id="stuAdd2" class='input-square'>
                                                            </div>
                                                        </div>

                                                        <div class="control-group">
                                                            <label for="county" class="control-label">Country<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <select name="country" id="country" class="required" onchange="getState(this.value, 'state')">
                                                                    <option value="">Select Country</option>
                                                                    <%{
                                                                            CountryBean cb = new CountryBean();
                                                                            Vector<Object> list = new Vector<Object>();
                                                                            list = Country.Query.viewAll();
                                                                            Iterator it = list.iterator();
                                                                            while (it.hasNext()) {
                                                                                cb = (CountryBean) it.next();
                                                                    %>
                                                                    <option value="<%=cb.getCountryId()%>"><%=cb.getCountryName()%></option>
                                                                    <%}
                                                                        }%>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="state" class="control-label">State<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <select name="state" id="state" class="required">
                                                                    <option value="">Select state</option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="pin" class="control-label">Pin<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="pin" id="pin" class="input-square required number">
                                                            </div>
                                                        </div>
                                                        
                                                    </div>
                                                    <!--------Right--------->
                                                    <div style="float: left;">
                                                        <div class="control-group">
                                                            <div class="controls">
                                                                <ul class="gallery">
                                                                    <li>
                                                                        <span  class="preview" id="photo1">
                                                                            <img id="photo" style="height: 115px;width: 90px; cursor: -webkit-zoom-in;"src="" alt=""></span>
                                                                    </li>
                                                                </ul>
                                                            </div>
                                                        </div>

                                                        <div class="control-group">
                                                            <label for="stuPhoto" class="control-label">File upload<span style="color:red"></span></label>
                                                            <div class="controls">
                                                                <input type="file" name="stuPhoto" id="fileInput" onchange="setPhoto(this.id, 'photo')">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="dob" class="control-label">Date of Birth<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="dob" id="dob" class="input-square datepick required">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="category" class="control-label">Category<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <select name="category" id="category" class='{required:true}'>
                                                                    <option value="">Select category</option>
                                                                    <%{
                                                                            CategoryBean cb = new CategoryBean();
                                                                            Vector<Object> list = new Vector<Object>();
                                                                            list = Category.Query.viewAll();
                                                                            Iterator it = list.iterator();
                                                                            while (it.hasNext()) {
                                                                                cb = (CategoryBean) it.next();
                                                                    %>
                                                                    <option value="<%=cb.getCategoryId()%>"><%=cb.getCategory()%></option>
                                                                    <%}
                                                                        }%>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-actions" style="clear: both; border-bottom: 1px solid #e5e5e5;">
                                                        <input type="submit" class='btn btn-primary' >
                                                    </div>
                                                </form>
                                            </div> 
                                        </div>
                                        <!-----------start From 3 for Guardians/Parents Details--------------------->                                                                    
                                        <div class="tab-pane <%if (to.equals("3")) {%>active<%}%>" id="3">
                                            <div class="box-content">
                                                <form action="/RIT/AddParents" method="post" class='form-horizontal' id="f3">

                                                    <legend>Guardian/Parents Details</legend>
                                                    <!--------Left--------->
                                                    <div style="float:left;width: 45%;">
                                                        <div class="control-group">
                                                            <label for="fName" class="control-label">Father Name<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="fName" id="fName" class="required">
                                                                <input type="hidden" name="admissionId" id="admissionId" value="<%=admissionId%>">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="fMobile" class="control-label">Father Mobile<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="fMobile" id="fMobile" class='input-square required number '>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="mName" class="control-label">Mother Name<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="mName" id="mName" class='input-square required '>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="mMobile" class="control-label">Mother Mobile</label>
                                                            <div class="controls">
                                                                <input type="text" name="mMobile" id="mMobile" class='input-square'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="fOccupation" class="control-label">Father Occupation<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="fOccupation" id="fOccupation" class='input-square required'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="mOccupation" class="control-label">Mother Occupation</label>
                                                            <div class="controls">
                                                                <input type="text" name="mOccupation" id="mOccupation" class='input-square'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="gName" class="control-label">Guardian Name<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="gName" id="gName" class='input-square required'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="relation" class="control-label">Guardian Relation<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="relation" id="relation" class='input-square required'>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <!--------Right--------->
                                                    <div style="float: left;">

                                                        <div class="control-group">
                                                            <label for="gOccupation" class="control-label">Guardian Occupation</label>
                                                            <div class="controls">
                                                                <input type="text" name="gOccupation" id="gOccupation" class='input-square'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="gMobile" class="control-label">Guardian Mobile<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="gMobile" id="gMobile" class='input-square required number'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="add1" class="control-label">Address 1<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="add1" id="add1" class='input-square required'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="add2" class="control-label">Address 2</label>
                                                            <div class="controls">
                                                                <input type="text" name="add2" id="add2" class='input-square'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="county" class="control-label">Country<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <select name="country" id="country" class='required' onchange="getState(this.value, 'state1')">
                                                                    <option value="">Select Country</option>
                                                                    <%{
                                                                            CountryBean cb = new CountryBean();
                                                                            Vector<Object> list = new Vector<Object>();
                                                                            list = Country.Query.viewAll();
                                                                            Iterator it = list.iterator();
                                                                            while (it.hasNext()) {
                                                                                cb = (CountryBean) it.next();
                                                                    %>
                                                                    <option value="<%=cb.getCountryId()%>"><%=cb.getCountryName()%></option>
                                                                    <%}
                                                                        }%>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="state" class="control-label">State<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <select name="state" id="state1" class='required'>
                                                                    <option value="">Select state</option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="pin" class="control-label">Pin<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="pin" id="pin" class='input-square required number'>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-actions" style="clear: both; border-bottom: 1px solid #e5e5e5;">
                                                        <input type="submit" class='btn btn-primary'>
                                                    </div>
                                                </form>
                                            </div> 
                                        </div>
                                        <!-----------start From 4 for Academic Details--------------------->                                                                    
                                        <div class="tab-pane <%if (to.equals("4")) {%>active<%}%>" id="4">

                                            <div class="box-content">
                                                <form action="/RIT/AddAcademic" method="post"  id="f4" class='form-horizontal'>
                                                    <legend>Academic Details</legend>
                                                    <!--------Left--------->
                                                    <div style="float:left;width: 45%;">
                                                        <div class="control-group">
                                                            <label for="hsRollNo" class="control-label">High School Roll No<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="hsRollNo" id="hsRollNo" class='required'>
                                                                <input type="hidden" name="admissionId" id="admissionId" value="<%=admissionId%>">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="hsBoard" class="control-label">High School Board<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="hsBoard" id="hsBoard" class='required'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="hsMaxMarks" class="control-label">High School Max Marks<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="hsMaxMarks" id="hsMaxMarks" class='input-square required number' onblur="chkMax('hsObtainMarks', 'hsMaxMarks')">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="hsObtainMarks" class="control-label">High School Obtain Marks<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="hsObtainMarks" id="hsObtainMarks" class='input-square required 'onblur="chkMax('hsObtainMarks', 'hsMaxMarks')">
                                                            </div>
                                                        </div>

                                                        <div class="control-group">
                                                            <label for="intRollNo" class="control-label">Intermediate Roll No<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="inRollNo" id="inRollNo" class='required'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="inBoard" class="control-label">Intermediate Board<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="inBoard" id="inBoard" class='input-square required'>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <!--------Right--------->
                                                    <div style="float: left;">

                                                        <div class="control-group">
                                                            <label for="inMaxMarks" class="control-label">Intermediate Max Marks<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="inMaxMarks" id="inMaxMarks" class='input-square required number'onblur="chkMax('inObtainMarks', 'inMaxMarks')">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="inObtainMarks" class="control-label">Intermediate Obtain Marks<span style="color:red">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" name="inObtainMarks" id="inObtainMarks" class='input-square required'onblur="chkMax('inObtainMarks', 'inMaxMarks')">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="otherquali" class="control-label">Other Qualification</label>
                                                            <div class="controls">
                                                                <input type="text" name="otherquali" id="otherquali" class=''>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="otherBoardUni" class="control-label">Board/University</label>
                                                            <div class="controls">
                                                                <input type="text" name="otherBoardUni" id="otherBoardUni" class='input-square'>
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="otherMaxMarks" class="control-label">Max Marks</label>
                                                            <div class="controls">
                                                                <input type="text" name="otherMaxMarks" id="otherMaxMarks" class='input-square'onblur="chkMax('otherObtailMarks', 'otherMaxMarks')">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label for="otherObtailMarks" class="control-label">Obtain Marks</label>
                                                            <div class="controls">
                                                                <input type="text" name="otherObtailMarks" id="otherObtailMarks" class='input-square' onblur="chkMax('otherObtailMarks', 'otherMaxMarks')">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-actions" style="clear: both; border-bottom: 1px solid #e5e5e5;">
                                                        <input type="submit" class='btn btn-primary'>
                                                    </div>
                                                </form>
                                            </div> 
                                        </div>
                                        <div class="tab-pane <%if (to.equals("5")) {%>active<%}%>" id="5">
                                            <div class="box-content">
                                                <legend style="float:none;">Academic Details</legend>
                                                <form action='/RIT/AddAdmissionDocument' method='post' id='f5' enctype='multipart/form-data' class='form-horizontal'>
                                                    <input type="hidden" name="admissionId" id="admissionId" value="<%=admissionId%>">
                                                    <div id="doc">

                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                        <!-----------start From 6 for Other Details--------------------->  
                                        <div class="tab-pane <%if (to.equals("6")) {%>active<%}%>" id="6">
                                            <div class="box-content">
                                                <form action="/RIT/AddFacility" method="post" class='form-horizontal'>
                                                    <legend>Transport</legend>
                                                    <div style="float:left;width: 45%;">
                                                        <div class="control-group">
                                                            <div class="controls">
                                                                <label class="radio" style="float: left;"><input type="radio" name="transport" value="1" checked>Yes</label>
                                                                <label class="radio" style="float: left;padding-top: 5px; padding-left: 100px;"><input type="radio" name="transport" value="0">No</label>
                                                                <input type="hidden" name="admissionId" id="admissionId" value="<%=admissionId%>">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <legend>Hostel</legend>
                                                    <div style="float:left;width: 45%;">
                                                        <div class="control-group">
                                                            <div class="controls">
                                                                <label class="radio" style="float: left;"><input type="radio" name="hostel" value="1" checked>Yes</label>
                                                                <label class="radio" style="float: left;padding-top: 5px; padding-left: 100px;"><input type="radio" name="hostel" value="0">No</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <legend>Mess</legend>
                                                    <div style="float:left;width: 45%;">
                                                        <div class="control-group">
                                                            <div class="controls">
                                                                <label class="radio" style="float: left;"><input type="radio" name="mess" value="1" checked>Yes</label>
                                                                <label class="radio" style="float: left;padding-top: 5px; padding-left: 100px;"><input type="radio" name="mess" value="0">No</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-actions" style="clear: both; border-bottom: 1px solid #e5e5e5;">
                                                        <input type="submit" class='btn btn-primary'>
                                                    </div>
                                                </form>
                                            </div> 
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>	

        <script src="/RIT/js/jquery.js"></script>
        <script src="/RIT/js/less.js"></script>
        <script src="/RIT/js/bootstrap.min.js"></script>
        <script src="/RIT/js/jquery.uniform.min.js"></script>
        <script src="/RIT/js/bootstrap.timepicker.js"></script>
        <script src="/RIT/js/bootstrap.datepicker.js"></script>
        <script src="/RIT/js/chosen.jquery.min.js"></script>
        <script src="/RIT/js/jquery.fancybox.js"></script>
        <script src="/RIT/js/plupload/plupload.full.js"></script>
        <script src="/RIT/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
        <script src="/RIT/js/jquery.cleditor.min.js"></script>
        <script src="/RIT/js/jquery.inputmask.min.js"></script>
        <script src="/RIT/js/jquery.tagsinput.min.js"></script>
        <script src="/RIT/js/jquery.mousewheel.js"></script>
        <script src="/RIT/js/jquery.textareaCounter.plugin.js"></script>
        <script src="/RIT/js/ui.spinner.js"></script>
        <script src="/RIT/js/jquery.jgrowl_minimized.js"></script>
        <script src="/RIT/js/jquery.form.js"></script>
        <script src="/RIT/js/jquery.validate.min.js"></script>
        <script src="/RIT/js/bbq.js"></script>
        <script src="/RIT/js/jquery-ui-1.8.22.custom.min.js"></script>
        <script src="/RIT/js/jquery.form.wizard-min.js"></script>
        <script src="/RIT/js/jquery.cookie.js"></script>
        <script src="/RIT/js/jquery.metadata.js"></script>
        <script src="/RIT/js/custom.js"></script><script src="/RIT/js/demo.js"></script>
        <script src="/RIT/js/iconfont.js"></script>
        <script>
                                                                    function chkMax(m, ma) {
                                                                        var min = parseInt(document.getElementById(m).value);
                                                                        var max = parseInt(document.getElementById(ma).value);
                                                                        if (min > max) {
                                                                            alert("check value!");
                                                                            document.getElementById(m).value = '';
                                                                            document.getElementById(ma).value = '';
                                                                        }
                                                                    }
        </script>
    </body>
</html>
<%
} else {
%>
<script type="text/javascript">
    alert("You Are Not Authorised");
    window.history.back();
</script>
<%             }
        } else {
            request.setAttribute("msg", "You Are Not Authorised! Please Contact to System Administrator!");
            request.setAttribute("value", "0");
            getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
        }
    } catch (Exception e) {
        request.setAttribute("msg", "Please Contact to System Administrator!");
        request.setAttribute("value", "0");
        getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
    }
%>
